<template>
  <div class="scoped-slot">
    <h2>这是作用域插槽组件</h2>
    <ul>
      <li v-for="item in items" :key="item.id">
        <slot :item="item"></slot>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'ScopedSlot',
  data() {
    return {
      items: [
        { id: 1, text: 'Item 1' },
        { id: 2, text: 'Item 2' },
        { id: 3, text: 'Item 3' },
      ],
    }
  },
}
</script>

<style scoped>
.scoped-slot {
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 20px;
}
</style>
